class DisCustomerRecordBean {
  int? id;
  String? noticeDate;
  String? groupName;
  String? customerNo;
  String? customerName;
  String? address;
  double? monthlyFee;
  int? quantityKeDa;
  String? expDate;
  String? expReason;
  String? dateRange;
  String? createDate;
  int? directFranchisee;

  DisCustomerRecordBean(
      {this.id,
      this.noticeDate,
      this.groupName,
      this.customerNo,
      this.customerName,
      this.address,
      this.monthlyFee,
      this.quantityKeDa,
      this.expDate,
      this.expReason,
      this.dateRange,
      this.createDate,
      this.directFranchisee});

  DisCustomerRecordBean.fromJson(Map<String, dynamic> json)
      : id = json['id'],
        noticeDate = json['noticeDate'],
        groupName = json['groupName'],
        customerNo = json['customerNo'],
        customerName = json['customerName'],
        address = json['address'],
        monthlyFee = json['monthlyFee'],
        quantityKeDa = json['quantityKeDa'],
        expDate = json['expDate'],
        expReason = json['expReason'],
        dateRange = json['dateRange'],
        createDate = json['createDate'],
        directFranchisee = json['directFranchisee'];

  Map<String, dynamic> toJson() => {
        'id': id,
        'noticeDate': noticeDate,
        'groupName': groupName,
        'customerNo': customerNo,
        'customerName': customerName,
        'address': address,
        'monthlyFee': monthlyFee,
        'quantityKeDa': quantityKeDa,
        'expDate': expDate,
        'expReason': expReason,
        'dateRange': dateRange,
        'createDate': createDate,
        'directFranchisee': directFranchisee,
      };

  DisCustomerRecordBean.empty(){
    DateTime now = DateTime.now();
    String createDate = "${now.year}-${now.month.toString().padLeft(2, '0')}-${now.day.toString().padLeft(2, '0')}";

    noticeDate = '';
    groupName = '';
    customerNo = '';
    customerName = '';
    address = '';
    monthlyFee = 0;
    quantityKeDa = 0;
    expDate = '';
    expReason = '';
    dateRange = '';
    createDate = createDate;
    directFranchisee = 1;
  }

}
